DEMO #3: In this example, you'll be able to run the whole loop to see if your prediction was correct!

  • First, let's practice indenting code INSIDE a loop. We say that commands are INSIDE a loop when they are indented 4 spaces under the first line.
  • Click Run and follow the directions on the stage to view the example.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)